package com.wwj.web.mapper;

import com.wwj.web.domain.ShiroPermission;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ShiroPermissionMapper {
    int deleteByPrimaryKey(Integer perid);

    int insert(ShiroPermission record);

    int insertSelective(ShiroPermission record);

    ShiroPermission selectByPrimaryKey(Integer perid);

    int updateByPrimaryKeySelective(ShiroPermission record);

    int updateByPrimaryKey(ShiroPermission record);

    /**
     * 根据角色id查询权限
     *
     * @param roleid
     * @return
     */
    List<ShiroPermission> getPermissionByRoleId(Integer roleid);

    /**
     * 根据用户id查询权限
     *
     * @param userid
     * @return
     */
    List<ShiroPermission> getPermissionByUserId(Integer userid);


}